import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '@/views/HomeView.vue'
import OnsiteRegistrationView from "@/views/OnsiteRegistrationView";
import LoginView from "@/views/LoginView";
import PhysicianPatientView from "@/views/PhysicianPatientView";
import MedicalRecordView from "@/views/MedicalRecordView";
import CheckRequestView from "@/views/CheckRequestView";
import ExpenseChargeView from "@/views/ExpenseChargeView";

const routes = [
  {
    path: '/',
    name: 'login',
    component: LoginView
  },
  {
    path: '/home',
    name: 'home',
    component: HomeView,
    children: [{
      path: '/home/onsite-registration',
      name: 'onsite-registration',
      component: OnsiteRegistrationView
    }, {
      path: '/home/physician-patient',
      name: 'physician-patient',
      component: PhysicianPatientView
    }, {
      path: '/home/medical-record',
      name: 'medical-record',
      component: MedicalRecordView
    }, {
      path: '/home/check-request',
      name: 'check-request',
      component: CheckRequestView
    }, {
      path: '/home/expense-charge',
      name: 'expense-charge',
      component: ExpenseChargeView
    }]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
